

* This Stata .do file replicates the figures and table in: Clemens and Postel, "Temporary Work Visas as US-Haiti Development Cooperation: A Preliminary Impact Evaluation"

version 14
set more off
clear all

**** TO USE THIS FILE YOU MUST SET THE WORKING DIRECTORY BELOW AND INSTALL -stripplot- AND -latab-

* 1. Change XXXX below to the filepath to your working directory

cd "XXXX"

* 2. If -stripplot- and -latab- not installed, install with: "ssc install stripplot" and "ssc install latab" (no quotation marks)

****************************************************************************************

capture log close
log using haiti_log, replace

use "survey_sample.dta", clear

stripplot IncMonthUS, over(Participant) xtitle("Income/month, with program (US$)", margin(medium)) stack aspect(.25) h(.55) ///
	scheme(s1color) width(60) xlabel(0(500)3000, format(%5.0fc))  ///
	bar(mean(mcolor(blue) mfcolor(white) msymbol(D)) lcolor(blue)) /// 
	mfcolor(black) msymbol(O) mlcolor(black) plotregion(lcolor(gs12)) ///
	xsc(lcolor(gs13)) ysc(lcolor(gs13)) ytitle("U.S. work allowed?")
	
	graph export IncMonthUS.png, replace width(1600)
	
mean IncMonthUS if Participant 
mean IncMonthUS if !Participant 

summarize IncMonthUS if Participant, detail
summarize IncMonthUS if !Participant, detail


stripplot monthly_avg_annual, over(Participant) xtitle("Average monthly income, whole year, household in Haiti (US$)", margin(medium)) ///
	stack aspect(.25) h(.1) ///
	scheme(s1color) width(12.5) xlabel(0(100)700, format(%5.0fc))  ///
	bar(mean(mcolor(blue) mfcolor(white) msymbol(D)) lcolor(blue)) /// 
	mfcolor(black) msymbol(O) mlcolor(black) plotregion(lcolor(gs12)) ///
	xsc(lcolor(gs13)) ysc(lcolor(gs13)) ytitle("U.S. work allowed?")
	
	graph export monthly_avg_annual.png, replace width(1600)
	
mean monthly_avg_annual if Participant
mean monthly_avg_annual if !Participant
ttest monthly_avg_annual, by(Participant)
	
summarize monthly_avg_annual if Participant, detail
summarize monthly_avg_annual if !Participant, detail
	
stripplot CurrExpMonth, over(Participant) xtitle("Average monthly consumption, whole year, household in Haiti (US$)", margin(medium)) ///
	stack aspect(.25) h(.2) ///
	scheme(s1color) width(12.5) xlabel(0(100)600, format(%5.0fc))  ///
	bar(mean(mcolor(blue) mfcolor(white) msymbol(D)) lcolor(blue)) /// 
	mfcolor(black) msymbol(O) mlcolor(black) plotregion(lcolor(gs12)) ///
	xsc(lcolor(gs13)) ysc(lcolor(gs13)) ytitle("U.S. work allowed?")
	
	graph export CurrExpMonth.png, replace width(1600)
	
mean CurrExpMonth if Participant 
mean CurrExpMonth if !Participant 
ttest CurrExpMonth, by(Participant)

summarize CurrExpMonth if Participant, detail
summarize CurrExpMonth if !Participant, detail
	
* Major purchases
mean MajorPurchaseAmount if Participant
mean MajorPurchaseAmount if !Participant
ttest MajorPurchaseAmount , by(Participant)
	
summarize MajorPurchaseAmount if Participant, detail
summarize MajorPurchaseAmount if !Participant, detail
	

	

* Summary stats

replace RoomsinHouse = "2" if RoomsinHouse=="5 (moved Jan 2016; old house 2)"
replace RoomsinHouse = "." if RoomsinHouse=="?"
destring RoomsinHouse, replace
gen cement_floor = FloorType=="Cement"
gen block_frame = Frametype=="Block"
gen metal_roof = RoofType == "Sheet metal"

gen inctot = AnnualHaitiIncome/12
gen foodexp = YearlyFoodExpenses/12 
gen educexp = YearlyEducationExpenses/12
gen tranexp = YearlyTransportExpenses/12
gen phonexp = YearlyPhoneExpenses/12
gen housexp = YearlyHouseholdExpenses/12
gen currexp = TotalCurrentYearlyExpenditure/12

tabstat HHSize HHmembers518 HHmembers518inschool FarmAreaHa RoomsinHouse cement_floor block_frame metal_roof inctot foodexp educexp tranexp phonexp housexp currexp, stats(mean sd min max) columns(s) format(%7.2g)
	
latabstat HHSize HHmembers518 HHmembers518inschool FarmAreaHa RoomsinHouse cement_floor block_frame metal_roof inctot foodexp educexp tranexp phonexp housexp currexp, stats(mean sd min max) columns(s) format(%7.2g)	
	
	
	
	
* National comparison

gen ln_IncMonth = ln(IncMonth)

histogram ln_IncMonth, scheme(s1color) width(.2) ///
	xlabel(0 "1" 2.303 "10" 4.605 "100" 6.908 "1,000") ///
	xmtick(0.0000 0.6931 1.0986 1.3863 1.6094 1.7918 1.9459 2.0794 2.1972 2.3026 2.9957 3.4012 3.6889 3.9120 4.0943 4.2485 4.3820 4.4998 4.6052 5.2983 5.7038 5.9915 6.2146 6.3969 6.5511 6.6846 6.8024 6.9078 7.6009 8.0064 8.2940 8.5172) ///
	lcolor(white) fcolor(gs10) plotregion(lcolor(gs12)) xsc(lcolor(gs13)) ysc(lcolor(gs13)) aspect(.15) ///
	xtitle("Survey sample income/month, without program (US$), log scale", margin(medsmall)) ytitle(, margin(medsmall)) ylabel(0 .5,format(%03.1f)) ///
	fysize(30) 
	
	* xlabel(2.53 "12.5" 3.22 "25"   3.91 "50" 4.61 "100" 5.30 "200" 5.99 "400" 6.68 "800" 7.38 "1,600" 8.07 "3,200") ///

	graph save participants.gph, replace
		
	mean ln_IncMonth
	mean IncMonth
	mean HHSize
	gen inccap = IncMonth/HHSize
	mean inccap
	
use "ecvmas.dta", clear
gen monthly_income = (itf/42.2)*1.05            // Average gourde exchange rate in October 2012. Inflate to 2016 US$ with US CPI
gen monthly_cash_income = (itf_m/42.2)*1.05
summ monthly_cash*
summarize monthly_cash*, detail	
gen wt=round(POIDS_FI*100)
gen ln_monthly_income = ln(monthly_income)
histogram ln_monthly_income if ln_monthly_income>0.2 & ln_monthly_income<8.2740 [w=wt], scheme(s1color) width(.2) ///
	xlabel(0 "1" 2.303 "10" 4.605 "100" 6.908 "1,000") ///
	xmtick(0.0000 0.6931 1.0986 1.3863 1.6094 1.7918 1.9459 2.0794 2.1972 2.3026 2.9957 3.4012 3.6889 3.9120 4.0943 4.2485 4.3820 4.4998 4.6052 5.2983 5.7038 5.9915 6.2146 6.3969 6.5511 6.6846 6.8024 6.9078 7.6009 8.0064 8.2940 8.5172) ///
	lcolor(white) fcolor(gs10) plotregion(lcolor(gs12)) xsc(lcolor(gs13)) ysc(lcolor(gs13)) aspect(.15) ///
	xtitle("Nationally representative sample income/month (2016 US$), log scale", margin(medsmall)) ytitle(, margin(medsmall)) ylabel(0 .4,format(%03.1f)) ///
	fysize(30) 
	
	graph save nation.gph, replace

	*	xlabel(2.53 "12.5" 3.22 "25"   3.91 "50" 4.61 "100" 5.30 "200" 5.99 "400" 6.68 "800" 7.38 "1,600" 8.07 "3,200") ///

	mean ln_monthly_income [w=wt]
	mean monthly_income [w=wt]
	mean HHsize [w=wt]
	gen inccap = monthly_income/HHsize
	mean inccap [w=wt]
	
	graph combine participants.gph nation.gph, cols(1) xcommon fysize(65)
	graph export compare_nation.png, width(1600) replace
	
log close



